package com.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
@Entity
@Table(name="tb_assets_details")
public class AssetsDetailsBean implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7994851120993929055L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "SQE_ASSETS_DETAILS") })
	@GeneratedValue(generator = "idGenerator")
	private Long id;
	private String detalis_date;//时间
	@Column(columnDefinition="number(10,2)")
	private Double assets_value;
	@Column(columnDefinition="number(10,2)")
	private Double ad_jc;//残值
	@Column(columnDefinition="number(10,2)")
	private Double ad_ytd;//月折旧额
	@Column(columnDefinition="number(10,2)")
	private Double ad_count_d;//累计折旧
	@Column(columnDefinition="number(10,2)")
	private Double ad_jz;//净值
	private Integer dept_id;
	private String assets_class;
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="assets_id")//加入一列作为外键
	private AssetsBean assets_id;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getDetalis_date() {
		return detalis_date;
	}
	public void setDetalis_date(String detalis_date) {
		this.detalis_date = detalis_date;
	}
	public Double getAssets_value() {
		return assets_value;
	}
	public void setAssets_value(Double assets_value) {
		this.assets_value = assets_value;
	}
	public Double getAd_jc() {
		return ad_jc;
	}
	public void setAd_jc(Double ad_jc) {
		this.ad_jc = ad_jc;
	}
	public Double getAd_ytd() {
		return ad_ytd;
	}
	public void setAd_ytd(Double ad_ytd) {
		this.ad_ytd = ad_ytd;
	}
	public Double getAd_count_d() {
		return ad_count_d;
	}
	public void setAd_count_d(Double ad_count_d) {
		this.ad_count_d = ad_count_d;
	}
	public Double getAd_jz() {
		return ad_jz;
	}
	public void setAd_jz(Double ad_jz) {
		this.ad_jz = ad_jz;
	}
	public Integer getDept_id() {
		return dept_id;
	}
	public void setDept_id(Integer dept_id) {
		this.dept_id = dept_id;
	}
	public String getAssets_class() {
		return assets_class;
	}
	public void setAssets_class(String assets_class) {
		this.assets_class = assets_class;
	}
	public AssetsBean getAssets_id() {
		return assets_id;
	}
	public void setAssets_id(AssetsBean assets_id) {
		this.assets_id = assets_id;
	}
}
